package com.gxa.modules.sys.service.impl;

import com.gxa.modules.sys.dto.SeatDto;
import com.gxa.modules.sys.entity.Seat;
import com.gxa.modules.sys.mapper.SeatMapper;
import com.gxa.modules.sys.service.SeatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public
class SeatServiceImpl implements SeatService {
    @Autowired
    private
    SeatMapper seatMapper;
    @Override
    public
    List<SeatDto> queryAll(SeatDto seatDto) {
        List<SeatDto> seats = seatMapper.queryAll(seatDto);
        return seats;
    }

    @Override
    public
    void updateLight(List<Seat> seats) {
        for (int i = 0; i < seats.size(); i++) {
            seatMapper.updateLight(seats.get(i).getLight(),seats.get(i).getId());

        }

    }


//    @Override
//    public
//    void updateOpen(List<Seat> ids) {
//        seatMapper.updateOpen(ids);
//    }

//    @Override
//    public
//    void updateClose(List<Seat> ids) {
//        seatMapper.updateClose(ids);
//
//    }
}
